package com.RLFZ.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.RLFZ.entity.LineTrend;
import com.RLFZ.entity.NocvData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 86166
 */
@Mapper
@Repository
public interface IndexMapper extends BaseMapper<NocvData> {
    /**
     *
     * @return
     */
    @Select("select * from line_trend order by create_time limit 7")
    List<LineTrend> findSevenData();
    @Select("select * from nocv_data order by id desc limit 34")
    List<NocvData> listOrderByIDLimit34();
    @Update("update nocv_data SET value=#{value} ,update_time=#{updateTime} where name=#{name}")
    void savve(NocvData nocvData);
    @Select("select max(id) from nocv_data")
    Integer max();
}
